{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Volumes/MAC/Dropbox/Non-phd research projects/On Leaks/Database/2019 Full replication ISQ/Stata replication/CaPe ISQ replications.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res} 3 May 2019, 08:14:42
{txt}
{com}. 
{txt}end of do-file

{com}. do "/var/folders/cw/pjqbl60n2493qbv73777pcyc0000gn/T//SD67575.000000"
{txt}
{com}. use "Leaks ISQ regressions_replication_final.dta", clear
{txt}
{com}. 
{txt}end of do-file

{com}. do "/var/folders/cw/pjqbl60n2493qbv73777pcyc0000gn/T//SD67575.000000"
{txt}
{com}. 
. * Detrend variables for Table 1
. regress mean_mean_rile year

      {txt}Source {c |}       SS       df       MS              Number of obs ={res}     117
{txt}{hline 13}{char +}{hline 30}           F(  1,   115) ={res}    3.05
    {txt}   Model {char |} {res} 9.98186783     1  9.98186783           {txt}Prob > F      = {res} 0.0833
    {txt}Residual {char |} {res} 376.122423   115  3.27062977           {txt}R-squared     = {res} 0.0259
{txt}{hline 13}{char +}{hline 30}           Adj R-squared = {res} 0.0174
    {txt}   Total {char |} {res} 386.104291   116  3.32848527           {txt}Root MSE      = {res} 1.8085

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}mean_mean_~e{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 8}year {c |}{col 14}{res}{space 2}-.1037299{col 26}{space 2} .0593764{col 37}{space 1}   -1.75{col 46}{space 3}0.083{col 54}{space 4}-.2213431{col 67}{space 3} .0138833
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 204.8669{col 26}{space 2} 119.3832{col 37}{space 1}    1.72{col 46}{space 3}0.089{col 54}{space 4} -31.6082{col 67}{space 3}  441.342
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. predict rile_residual, resid
{txt}(4 missing values generated)

{com}. 
. regress rile_polarize year

      {txt}Source {c |}       SS       df       MS              Number of obs ={res}     117
{txt}{hline 13}{char +}{hline 30}           F(  1,   115) ={res}    0.11
    {txt}   Model {char |} {res}  1.0374087     1   1.0374087           {txt}Prob > F      = {res} 0.7364
    {txt}Residual {char |} {res} 1047.58369   115  9.10942339           {txt}R-squared     = {res} 0.0010
{txt}{hline 13}{char +}{hline 30}           Adj R-squared = {res}-0.0077
    {txt}   Total {char |} {res}  1048.6211   116  9.03983706           {txt}Root MSE      = {res} 3.0182

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}rile_polar~e{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 8}year {c |}{col 14}{res}{space 2} .0334405{col 26}{space 2} .0990931{col 37}{space 1}    0.34{col 46}{space 3}0.736{col 54}{space 4}-.1628439{col 67}{space 3} .2297249
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-23.91388{col 26}{space 2} 199.2383{col 37}{space 1}   -0.12{col 46}{space 3}0.905{col 54}{space 4}-418.5667{col 67}{space 3} 370.7389
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. predict rile_polar_residual, resid
{txt}(4 missing values generated)

{com}. 
. glm sum_leaks_EUonly year, family(poisson) link(logit)
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-99.847452}  
Iteration 1:{space 3}log likelihood = {res:-83.939138}  
Iteration 2:{space 3}log likelihood = {res:-83.559362}  
Iteration 3:{space 3}log likelihood = {res:-83.558177}  
Iteration 4:{space 3}log likelihood = {res:-83.558177}  
{res}
{txt}Generalized linear models{col 52}No. of obs{col 68}={col 70}{res}      120
{txt}Optimization     : {res}ML{txt}{col 52}Residual df{col 68}={col 70}{res}      118
{col 20}{txt}{col 52}Scale parameter{col 68}={col 70}{res}        1
{txt}Deviance{col 18}={res}{col 20} 104.8367233{txt}{col 52}(1/df) Deviance{col 68}={res}{col 70} .8884468
{txt}Pearson{col 18}={res}{col 20} 174.8365083{txt}{col 52}(1/df) Pearson{col 68}={res}{col 70} 1.481665

{txt}Variance function: {res}V(u) = {col 27}u{col 52}{txt}[{res}Poisson{txt}]
Link function    : {res}g(u) = {col 27}ln(u/(1-u)){col 52}{txt}[{res}Logit{txt}]

{col 52}{help j_glmic##|_new:AIC}{col 68}={res}{col 70}  1.42597
{txt}Log likelihood{col 18}= {res} -83.5581766{txt}{col 52}{help j_glmic##|_new:BIC}{col 68}={res}{col 70}-460.0873

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}      OIM
{col 1}sum_leaks_EUonly{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      z{col 50}   P>|z|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 12}year {c |}{col 18}{res}{space 2} .3369829{col 30}{space 2} .0968495{col 41}{space 1}    3.48{col 50}{space 3}0.001{col 58}{space 4} .1471612{col 71}{space 3} .5268045
{txt}{space 11}_cons {c |}{col 18}{res}{space 2}-678.4548{col 30}{space 2} 194.7628{col 41}{space 1}   -3.48{col 50}{space 3}0.000{col 58}{space 4}-1060.183{col 71}{space 3}-296.7267
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. predict EUleaks_resid_r, r
{txt}(1 missing value generated)

{com}. 
. glm sum_leaks_EUonly year, family(poisson) link(logit)
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-99.847452}  
Iteration 1:{space 3}log likelihood = {res:-83.939138}  
Iteration 2:{space 3}log likelihood = {res:-83.559362}  
Iteration 3:{space 3}log likelihood = {res:-83.558177}  
Iteration 4:{space 3}log likelihood = {res:-83.558177}  
{res}
{txt}Generalized linear models{col 52}No. of obs{col 68}={col 70}{res}      120
{txt}Optimization     : {res}ML{txt}{col 52}Residual df{col 68}={col 70}{res}      118
{col 20}{txt}{col 52}Scale parameter{col 68}={col 70}{res}        1
{txt}Deviance{col 18}={res}{col 20} 104.8367233{txt}{col 52}(1/df) Deviance{col 68}={res}{col 70} .8884468
{txt}Pearson{col 18}={res}{col 20} 174.8365083{txt}{col 52}(1/df) Pearson{col 68}={res}{col 70} 1.481665

{txt}Variance function: {res}V(u) = {col 27}u{col 52}{txt}[{res}Poisson{txt}]
Link function    : {res}g(u) = {col 27}ln(u/(1-u)){col 52}{txt}[{res}Logit{txt}]

{col 52}{help j_glmic##|_new:AIC}{col 68}={res}{col 70}  1.42597
{txt}Log likelihood{col 18}= {res} -83.5581766{txt}{col 52}{help j_glmic##|_new:BIC}{col 68}={res}{col 70}-460.0873

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}      OIM
{col 1}sum_leaks_EUonly{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      z{col 50}   P>|z|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 12}year {c |}{col 18}{res}{space 2} .3369829{col 30}{space 2} .0968495{col 41}{space 1}    3.48{col 50}{space 3}0.001{col 58}{space 4} .1471612{col 71}{space 3} .5268045
{txt}{space 11}_cons {c |}{col 18}{res}{space 2}-678.4548{col 30}{space 2} 194.7628{col 41}{space 1}   -3.48{col 50}{space 3}0.000{col 58}{space 4}-1060.183{col 71}{space 3}-296.7267
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. predict EUleaks_resid_w, w
{txt}(1 missing value generated)

{com}. 
. glm sum_leaks_possEU year, family(poisson) link(logit)
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-135.31763}  
Iteration 1:{space 3}log likelihood = {res:-109.62992}  
Iteration 2:{space 3}log likelihood = {res:-108.42289}  
Iteration 3:{space 3}log likelihood = {res:-107.39701}  
Iteration 4:{space 3}log likelihood = {res:-107.39655}  
Iteration 5:{space 3}log likelihood = {res:-107.39655}  
{res}
{txt}Generalized linear models{col 52}No. of obs{col 68}={col 70}{res}      120
{txt}Optimization     : {res}ML{txt}{col 52}Residual df{col 68}={col 70}{res}      118
{col 20}{txt}{col 52}Scale parameter{col 68}={col 70}{res}        1
{txt}Deviance{col 18}={res}{col 20} 136.2558673{txt}{col 52}(1/df) Deviance{col 68}={res}{col 70} 1.154711
{txt}Pearson{col 18}={res}{col 20}  182.461813{txt}{col 52}(1/df) Pearson{col 68}={res}{col 70} 1.546287

{txt}Variance function: {res}V(u) = {col 27}u{col 52}{txt}[{res}Poisson{txt}]
Link function    : {res}g(u) = {col 27}ln(u/(1-u)){col 52}{txt}[{res}Logit{txt}]

{col 52}{help j_glmic##|_new:AIC}{col 68}={res}{col 70} 1.823276
{txt}Log likelihood{col 18}= {res}-107.3965476{txt}{col 52}{help j_glmic##|_new:BIC}{col 68}={res}{col 70}-428.6682

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}      OIM
{col 1}sum_leaks_possEU{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      z{col 50}   P>|z|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 12}year {c |}{col 18}{res}{space 2} .1009808{col 30}{space 2} .0904391{col 41}{space 1}    1.12{col 50}{space 3}0.264{col 58}{space 4}-.0762765{col 71}{space 3} .2782382
{txt}{space 11}_cons {c |}{col 18}{res}{space 2}-203.3278{col 30}{space 2} 181.8051{col 41}{space 1}   -1.12{col 50}{space 3}0.263{col 58}{space 4}-559.6593{col 71}{space 3} 153.0038
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. predict poss_EUleaks_resid_r, r
{txt}(1 missing value generated)

{com}. 
. glm sum_leaks_possEU year, family(poisson) link(logit)
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-135.31763}  
Iteration 1:{space 3}log likelihood = {res:-109.62992}  
Iteration 2:{space 3}log likelihood = {res:-108.42289}  
Iteration 3:{space 3}log likelihood = {res:-107.39701}  
Iteration 4:{space 3}log likelihood = {res:-107.39655}  
Iteration 5:{space 3}log likelihood = {res:-107.39655}  
{res}
{txt}Generalized linear models{col 52}No. of obs{col 68}={col 70}{res}      120
{txt}Optimization     : {res}ML{txt}{col 52}Residual df{col 68}={col 70}{res}      118
{col 20}{txt}{col 52}Scale parameter{col 68}={col 70}{res}        1
{txt}Deviance{col 18}={res}{col 20} 136.2558673{txt}{col 52}(1/df) Deviance{col 68}={res}{col 70} 1.154711
{txt}Pearson{col 18}={res}{col 20}  182.461813{txt}{col 52}(1/df) Pearson{col 68}={res}{col 70} 1.546287

{txt}Variance function: {res}V(u) = {col 27}u{col 52}{txt}[{res}Poisson{txt}]
Link function    : {res}g(u) = {col 27}ln(u/(1-u)){col 52}{txt}[{res}Logit{txt}]

{col 52}{help j_glmic##|_new:AIC}{col 68}={res}{col 70} 1.823276
{txt}Log likelihood{col 18}= {res}-107.3965476{txt}{col 52}{help j_glmic##|_new:BIC}{col 68}={res}{col 70}-428.6682

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}      OIM
{col 1}sum_leaks_possEU{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      z{col 50}   P>|z|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 12}year {c |}{col 18}{res}{space 2} .1009808{col 30}{space 2} .0904391{col 41}{space 1}    1.12{col 50}{space 3}0.264{col 58}{space 4}-.0762765{col 71}{space 3} .2782382
{txt}{space 11}_cons {c |}{col 18}{res}{space 2}-203.3278{col 30}{space 2} 181.8051{col 41}{space 1}   -1.12{col 50}{space 3}0.263{col 58}{space 4}-559.6593{col 71}{space 3} 153.0038
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. predict poss_EUleaks_resid_w, w
{txt}(1 missing value generated)

{com}. 
. glm sum_leaks_notEU year, family(poisson) link(logit)
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-87.214437}  
Iteration 1:{space 3}log likelihood = {res:-77.174961}  
Iteration 2:{space 3}log likelihood = {res:-76.927357}  
Iteration 3:{space 3}log likelihood = {res:-76.926944}  
Iteration 4:{space 3}log likelihood = {res:-76.926944}  
{res}
{txt}Generalized linear models{col 52}No. of obs{col 68}={col 70}{res}      120
{txt}Optimization     : {res}ML{txt}{col 52}Residual df{col 68}={col 70}{res}      118
{col 20}{txt}{col 52}Scale parameter{col 68}={col 70}{res}        1
{txt}Deviance{col 18}={res}{col 20} 94.40721995{txt}{col 52}(1/df) Deviance{col 68}={res}{col 70} .8000612
{txt}Pearson{col 18}={res}{col 20} 137.2682445{txt}{col 52}(1/df) Pearson{col 68}={res}{col 70}  1.16329

{txt}Variance function: {res}V(u) = {col 27}u{col 52}{txt}[{res}Poisson{txt}]
Link function    : {res}g(u) = {col 27}ln(u/(1-u)){col 52}{txt}[{res}Logit{txt}]

{col 52}{help j_glmic##|_new:AIC}{col 68}={res}{col 70} 1.315449
{txt}Log likelihood{col 18}= {res}-76.92694385{txt}{col 52}{help j_glmic##|_new:BIC}{col 68}={res}{col 70}-470.5168

{txt}{hline 16}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 17}{c |}{col 29}      OIM
{col 1}sum_leaks_notEU{col 17}{c |}      Coef.{col 29}   Std. Err.{col 41}      z{col 49}   P>|z|{col 57}     [95% Con{col 70}f. Interval]
{hline 16}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 11}year {c |}{col 17}{res}{space 2} .2479066{col 29}{space 2} .0885161{col 40}{space 1}    2.80{col 49}{space 3}0.005{col 57}{space 4} .0744182{col 70}{space 3}  .421395
{txt}{space 10}_cons {c |}{col 17}{res}{space 2}-499.4896{col 29}{space 2} 178.0126{col 40}{space 1}   -2.81{col 49}{space 3}0.005{col 57}{space 4}-848.3878{col 70}{space 3}-150.5913
{txt}{hline 16}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. predict not_EUleaks_resid_r, r
{txt}(1 missing value generated)

{com}. 
. glm sum_leaks_notEU year, family(poisson) link(logit)
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-87.214437}  
Iteration 1:{space 3}log likelihood = {res:-77.174961}  
Iteration 2:{space 3}log likelihood = {res:-76.927357}  
Iteration 3:{space 3}log likelihood = {res:-76.926944}  
Iteration 4:{space 3}log likelihood = {res:-76.926944}  
{res}
{txt}Generalized linear models{col 52}No. of obs{col 68}={col 70}{res}      120
{txt}Optimization     : {res}ML{txt}{col 52}Residual df{col 68}={col 70}{res}      118
{col 20}{txt}{col 52}Scale parameter{col 68}={col 70}{res}        1
{txt}Deviance{col 18}={res}{col 20} 94.40721995{txt}{col 52}(1/df) Deviance{col 68}={res}{col 70} .8000612
{txt}Pearson{col 18}={res}{col 20} 137.2682445{txt}{col 52}(1/df) Pearson{col 68}={res}{col 70}  1.16329

{txt}Variance function: {res}V(u) = {col 27}u{col 52}{txt}[{res}Poisson{txt}]
Link function    : {res}g(u) = {col 27}ln(u/(1-u)){col 52}{txt}[{res}Logit{txt}]

{col 52}{help j_glmic##|_new:AIC}{col 68}={res}{col 70} 1.315449
{txt}Log likelihood{col 18}= {res}-76.92694385{txt}{col 52}{help j_glmic##|_new:BIC}{col 68}={res}{col 70}-470.5168

{txt}{hline 16}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 17}{c |}{col 29}      OIM
{col 1}sum_leaks_notEU{col 17}{c |}      Coef.{col 29}   Std. Err.{col 41}      z{col 49}   P>|z|{col 57}     [95% Con{col 70}f. Interval]
{hline 16}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 11}year {c |}{col 17}{res}{space 2} .2479066{col 29}{space 2} .0885161{col 40}{space 1}    2.80{col 49}{space 3}0.005{col 57}{space 4} .0744182{col 70}{space 3}  .421395
{txt}{space 10}_cons {c |}{col 17}{res}{space 2}-499.4896{col 29}{space 2} 178.0126{col 40}{space 1}   -2.81{col 49}{space 3}0.005{col 57}{space 4}-848.3878{col 70}{space 3}-150.5913
{txt}{hline 16}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. predict not_EUleaks_resid_w, w
{txt}(1 missing value generated)

{com}. 
. 
. ******* logit model, for predictive power
. logit leaks_EUonly_dum mean_mean_rile rile_polarize, cluster(year)

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-64.383987}  
Iteration 1:{space 3}log pseudolikelihood = {res:-61.137024}  
Iteration 2:{space 3}log pseudolikelihood = {res:-61.068654}  
Iteration 3:{space 3}log pseudolikelihood = {res:-61.068588}  
Iteration 4:{space 3}log pseudolikelihood = {res:-61.068588}  
{res}
{txt}Logistic regression{col 51}Number of obs{col 67}= {res}       117
{txt}{col 51}Wald chi2({res}2{txt}){col 67}= {res}     13.39
{txt}{col 51}Prob > chi2{col 67}= {res}    0.0012
{txt}Log pseudolikelihood = {res}-61.068588{txt}{col 51}Pseudo R2{col 67}= {res}    0.0515

{txt}{ralign 82:(Std. Err. adjusted for {res:10} clusters in year)}
{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}    Robust
{col 1}leaks_EUonly_dum{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      z{col 50}   P>|z|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}mean_mean_rile {c |}{col 18}{res}{space 2}-.2239143{col 30}{space 2}  .112929{col 41}{space 1}   -1.98{col 50}{space 3}0.047{col 58}{space 4}-.4452511{col 71}{space 3}-.0025774
{txt}{space 3}rile_polarize {c |}{col 18}{res}{space 2} .1548451{col 30}{space 2} .0724686{col 41}{space 1}    2.14{col 50}{space 3}0.033{col 58}{space 4} .0128093{col 71}{space 3}  .296881
{txt}{space 11}_cons {c |}{col 18}{res}{space 2}-8.776982{col 30}{space 2} 2.950244{col 41}{space 1}   -2.98{col 50}{space 3}0.003{col 58}{space 4}-14.55935{col 71}{space 3}-2.994609
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. estat class

{txt}Logistic model for leaks_EUonly_dum

{col 15}{hline 8} True {hline 8}
Classified {c |}{col 22}D{col 35}~D  {c |}{col 46}Total
{hline 11}{c +}{hline 26}{c +}{hline 11}
{col 6}+{col 12}{c |} {res}        0{col 28}        0{txt}  {c |}  {res}        0
{txt}{col 6}-{col 12}{c |} {res}       28{col 28}       89{txt}  {c |}  {res}      117
{txt}{hline 11}{c +}{hline 26}{c +}{hline 11}
   Total   {c |} {res}       28{col 28}       89{txt}  {c |}  {res}      117

{txt}Classified + if predicted Pr(D) >= .5
True D defined as leaks_EUonly_dum != 0
{hline 50}
Sensitivity                     Pr( +| D){res}    0.00%
{txt}Specificity                     Pr( -|~D){res}  100.00%
{txt}Positive predictive value       Pr( D| +){res}       .%
{txt}Negative predictive value       Pr(~D| -){res}   76.07%
{txt}{hline 50}
False + rate for true ~D        Pr( +|~D){res}    0.00%
{txt}False - rate for true D         Pr( -| D){res}  100.00%
{txt}False + rate for classified +   Pr(~D| +){res}       .%
{txt}False - rate for classified -   Pr( D| -){res}   23.93%
{txt}{hline 50}
Correctly classified                     {res}   76.07%
{txt}{hline 50}

{com}. 
{txt}end of do-file

{com}. do "/var/folders/cw/pjqbl60n2493qbv73777pcyc0000gn/T//SD67575.000000"
{txt}
{com}. 
. * Base model
. poisson sum_leaks_EUonly   mean_mean_rile     , cluster(year)
{res}
{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-87.426388}  
Iteration 1:{space 3}log pseudolikelihood = {res:-87.426328}  
Iteration 2:{space 3}log pseudolikelihood = {res:-87.426328}  
{res}
{txt}Poisson regression{col 51}Number of obs{col 67}= {res}       117
{txt}{col 51}Wald chi2({res}1{txt}){col 67}= {res}      4.71
{txt}Log pseudolikelihood = {res}-87.426328{txt}{col 51}Prob > chi2{col 67}= {res}    0.0301

{txt}{ralign 82:(Std. Err. adjusted for {res:10} clusters in year)}
{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}    Robust
{col 1}sum_leaks_EUonly{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      z{col 50}   P>|z|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}mean_mean_rile {c |}{col 18}{res}{space 2}-.2334266{col 30}{space 2} .1076063{col 41}{space 1}   -2.17{col 50}{space 3}0.030{col 58}{space 4}-.4443311{col 71}{space 3}-.0225222
{txt}{space 11}_cons {c |}{col 18}{res}{space 2}-2.042469{col 30}{space 2} .4113615{col 41}{space 1}   -4.97{col 50}{space 3}0.000{col 58}{space 4}-2.848722{col 71}{space 3}-1.236215
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. 
{txt}end of do-file

{com}. do "/var/folders/cw/pjqbl60n2493qbv73777pcyc0000gn/T//SD67575.000000"
{txt}
{com}. 
. *** create leaks over time (Figure 1)
. use "leaks and baseline by month.dta", clear
{txt}
{com}. 
. * Make Figure 1: leaks per month, 2006-2015
. twoway (line quarterly_leaks mdate if year>2004, lpattern (longdash) lcolor(black) yax(2)) (lfitci quarterly_leaks mdate if year>2004, lcolor(black) alc(gs12) yax(2)), legend(size(small)) graphregion(color(white))
{res}{txt}
{com}. graph export "CaPe_Figure1.eps", as(eps) preview(off) replace
{txt}(note: file CaPe_Figure1.eps not found)
(file CaPe_Figure1.eps written in EPS format)

{com}. 
{txt}end of do-file

{com}. exit
